'use strict';

const Controller = require('egg').Controller;

class TestController extends Controller {
    async index() {
        console.log("查询数据");
        let {ctx} = this;
        ctx.body = "查询数据"
    }
    async create(){
        let {ctx} = this;
        ctx.body = "创建"
    }
    async update(){
        let {ctx} = this;
        ctx.body = "更新"+ctx.params.id
    }
    async destroy(){
        let {ctx} = this;
        ctx.body = "删除"+ctx.params.id
    }
    async show(){
        let {ctx} = this;
        ctx.body = "详情"+ctx.params.id
    }
}

module.exports = TestController;
